from xgoedu import XGOEDU
dog = XGOEDU()
 
# 绘制直线
# dog.lcd_line(80, 80, 150, 150, color=(255, 0, 0), width=2)

# 绘制圆
# dog.lcd_circle(30, 30, 60, 60, 0, 45, color=(255, 0, 0), width=2)

# 绘制直线和圆
# dog.lcd_circle(50, 50, 100, 100, 0, 360, color=(255, 0, 0), width=2)
# dog.lcd_line(50, 50, 100, 100, color=(255, 0, 0), width=2)

# --------拍照
# from xgoedu import XGOEDU
# dog = XGOEDU()
# dog.xgoTakePhoto() # photo.jpg

# --- 图片尺寸压缩
from img.tools import resize_image_to_fit_screen
# imgPath = "./img/face-ai.png"  
# imgPath = '/home/pi/xgoPictures/face-ai.png'
# imgPath = '/home/pi/xgoPictures/r-face-ai.png'
# imgPath = 'r-face-ai.png'
# imgPath = 'photo.jpg'
imgPath = 'r-good.jpg'
# resize_image_to_fit_screen("/home/pi/xgoPictures/good.jpg", "/home/pi/xgoPictures/r-good.jpg")
r = dog.lcd_picture(
    imgPath
    # "/home/pi/temp.jpg"  # 这样系统会  /home/pi/xgoPictures/home/pi/temp.jpg   这样查找不到
)
# l = dog.lcd_picture("temp.jpg") # 这样正确
print(r)



